package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.hq.ims.data.entityenum.EnumPlatformTodoType;
import com.hq.ims.data.vo.PlatformTodoStatisticsMapstruct;
import com.hq.mybatis.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* @author 蒋柏平
* @since 20241108
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Alias("PlatformTodoStatistics")
@TableName(value = "platform_todo_statistics")
@ApiModel(value = "平台端待办统计", description = "平台端待办统计")
public class PlatformTodoStatistics extends BaseModel<PlatformTodoStatistics> implements Serializable {

    @ApiModelProperty(value = "地区编码")
    @TableId(value = "platform_todo_statistics_id", type = IdType.ASSIGN_UUID)
    private String platformTodoStatisticsId;

    @ApiModelProperty(value = "平台待办类型")
    @TableField(value = "platform_todo_type")
    private EnumPlatformTodoType platformTodoType;

    @ApiModelProperty(value = "待办类型数量")
    @TableField(value = "platform_todo_type_count")
    private Integer platformTodoTypeCount;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_date_time", fill = FieldFill.INSERT)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDateTime;

    public PlatformTodoStatisticsMapstruct.PlatformTodoStatisticsRowAuthVo auth(){
        PlatformTodoStatisticsMapstruct.PlatformTodoStatisticsRowAuthVo auth = new PlatformTodoStatisticsMapstruct.PlatformTodoStatisticsRowAuthVo(this);
        return auth;
    }

}
